Skip to content

[Browser Rendering] Errors doc#28614

Open
ToriLindsay wants to merge 14 commits intoproductionfrom
tori/browser-rendering-error-codes
Open

[Browser Rendering] Errors doc#28614
ToriLindsay wants to merge 14 commits intoproductionfrom
tori/browser-rendering-error-codes

Conversation

@ToriLindsay
Copy link
Copy Markdown
Contributor

New errors doc for Browser Rendering

@github-actions
Copy link
Copy Markdown
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/docs/browser-rendering/ @mchenco, @cloudflare/pcx-technical-writing, @celso, @kathayl, @ToriLindsay
* @cloudflare/pcx-technical-writing


| HTTP code | Internal code | Error | Description | Recommended fix |
| --- | --- | --- | --- | --- |
| `400` | - | `Bad Request` | The request is malformed or contains invalid parameters. | Refer to the [REST API documentation](/browser-rendering/rest-api/). |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this the right link? this just takes to REST API overview page which i still don't know what to do next. If they need to go to specific endpoint page, maybe should add that wording in here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kathayl Adding "for the specific endpoint you are using and check the required parameters" to next commit.


Service-level errors occur when Browser Rendering cannot fulfill a request due to system availability, authentication, or resource constraints. These errors apply to both the [REST API](/browser-rendering/rest-api/) and [Workers Bindings](/browser-rendering/workers-bindings/).

| HTTP code | Internal code | Error | Description | Recommended fix |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

general table question. do we purposely have periods in each box?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kathayl Since some of the cells have multiple sentences, those need periods. And if some of them have periods, I think all of them should have periods for consistency. afaik there's no specific rule about it other than consistency.

| `400` | - | `Bad Request` | The request is malformed or contains invalid parameters. | Refer to the [REST API documentation](/browser-rendering/rest-api/). |
| `401` | `10000` | `Authentication failed` | Authentication credentials are invalid or missing. | Verify your API token exists and has `Browser Rendering - Edit` permissions. Refer to [REST API prerequisites](/browser-rendering/rest-api/#before-you-begin). |
| `408` | - | `Request timed out` | The request exceeded the allowed time limit. | Increase timeout settings. Refer to [REST API timeouts](/browser-rendering/reference/timeouts/). |
| `413` | - | `Error: request entity too large` | The request body exceeds the maximum allowed size (50 MB for PDF endpoint). | Reduce request payload size by hosting assets externally (such as on [R2](/r2/) or [Images](/images/)) and referencing via URLs instead of embedding them inline. Refer to [PDF endpoint request size limits](/browser-rendering/rest-api/pdf-endpoint/). |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to have this point to the note specifically? If not, maybe at least the section that the note is in instead of the top of PDF page

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will add link to that section in next commit - can't link to note


| Internal code | Error | Description | Recommended fix |
| --- | --- | --- | --- |
| `6000` | `Execution context was destroyed`, `Navigating frame was detached` | The execution context was destroyed, most likely because of a navigation or page reload. | Add [wait conditions](/browser-rendering/reference/timeouts/) or retry logic to handle navigation timing. |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add link

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kathayl I added a link but would be open to your recommendation if you think a different link is better?

| `6000` | `Execution context was destroyed`, `Navigating frame was detached` | The execution context was destroyed, most likely because of a navigation or page reload. | Add [wait conditions](/browser-rendering/reference/timeouts/) or retry logic to handle navigation timing. |
| `6001` | `TargetCloseError` | The target closed due to user or site actions, or excessive memory consumption. | Check if the site calls `window.close()` or consumes excessive memory. Refer to [browser close reasons](/browser-rendering/reference/browser-close-reasons/). |
| `6002` | `TimeoutError`, `Navigation timeout`, `timed out`, `Waiting failed: .* exceeded` | A timeout was reached during a browser operation. | Increase the relevant [timeout settings](/browser-rendering/reference/timeouts/) for your operation (page load, element wait, or action timeout). |
| `6003` | `Page.captureScreenshot`, `Page.printToPDF`, `Page is too large`, `Unable to capture screenshot` | Failed to capture screenshot or generate PDF. The page may be too large or in an invalid state. | Reduce page size, simplify content, or adjust [screenshot](/browser-rendering/rest-api/screenshot-endpoint/) or [PDF](/browser-rendering/rest-api/pdf-endpoint/) parameters. |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for these two links, instead of linking to page which starts users at top of page, should we link to the advanced section which is where we start using more parameters AND has the link to REST API docs?

like https://tori-browser-rendering-error-codes.preview.developers.cloudflare.com/browser-rendering/rest-api/screenshot-endpoint/#advanced-usage

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding with next commit

@github-actions
Copy link
Copy Markdown
Contributor

Hey there, we've marked this pull request as stale because there's no recent activity on it. This label is helps us identify PRs that might need updates (or to be closed out by our team if no longer relevant).

@github-actions github-actions bot added the stale label Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants